package com.slz3.business.module.goodsManagement.gooInWarehouse.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooInWarehouse.domain.GooInWarehouse;
import com.slz3.business.module.goodsManagement.gooInWarehouse.domain.GooInWarehouseCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class GooInWarehouseResAtomic extends GooInWarehouseResExecutor {

    public Mono<ServerResponse> add_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouse gooInWarehouse) {
        return GooInWarehouseResSafeValid.add(req, gooInWarehouse) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, gooInWarehouse);
    }

    public Mono<ServerResponse> delete_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.delete(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouse gooInWarehouse) {
        return GooInWarehouseResSafeValid.modify(req, gooInWarehouse) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, gooInWarehouse);
    }

    public Mono<ServerResponse> info_$GooInWarehouseUpdateLock(ServerRequest req) {
        return GooInWarehouseResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.auditSubmit(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.audit(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.auditReject(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.usingEnable(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$GooInWarehouseUpdateLock(ServerRequest req, GooInWarehouseCondition gooInWarehouseCondition) {
        return GooInWarehouseResSafeValid.usingDisable(req, gooInWarehouseCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
